/*
 * @Description: 
 * @Version: 2.0
 * @Autor: ftt
 * @Date: 2022-04-01 11:35:29
 * @LastEditors: ftt
 * @LastEditTime: 2022-04-01 11:41:54
 */

import 'package:flutter/material.dart';

import 'comment_tools.dart';

abstract class NormalImageTool {
  static String configImageName(dynamic type) {
    return "";
  }

  static Image configAssetImage(dynamic type,
      {double? w, double? h, BoxFit? fit, String format = 'png'}) {
    return Image.asset(
      configImagePath(type),
      width: w,
      height: h,
      fit: fit,
    );
  }

  static String configImagePath(dynamic type, {String format = 'png'}) {
    return NormalImageTool.configImagePathforimagename(
      NormalImageTool.configImageName(type),
      format: format,
    );
  }

  static String configImagePathforimagename(String name,
      {String format = 'png'}) {
    return CommentTools.getImagePath(
      name,
      format: format,
    );
  }
}